Skip to content

Pqc falcon512#32

Merged
Federico2014 merged 9 commits into
Federico2014:pqc-falcon512from
Little-Peony:pqc-falcon512
May 26, 2026
Merged

Pqc falcon512#32
Federico2014 merged 9 commits into
Federico2014:pqc-falcon512from
Little-Peony:pqc-falcon512

Conversation

@Federico2014
Copy link
Copy Markdown
Owner

@Federico2014 Federico2014 commented May 25, 2026

What does this PR do?

Why are these changes required?

This PR has been tested by:

  • Unit Tests
  • Manual Testing

Follow up

Extra details


Summary by cubic

Adds a Prometheus histogram tron:tx_fetch_latency_seconds to measure GET_DATA → TXS round-trip for actively fetched transactions, as a companion to tron:block_fetch_latency_seconds. Observed in the processMessage drain loop so samples are recorded, with one clock read per TXS message.

  • New Features
    • Added TX_FETCH_LATENCY in MetricKeys and initialized it in MetricsHistogram.
    • In TransactionsMsgHandler, observes latency via PeerConnection.advInvRequest; ignores gossip-pushed TXs.

Written for commit 9cb41b9. Summary will update on new commits. Review in cubic

Federico2014 and others added 6 commits May 25, 2026 02:06
…tron into pqc-falcon512

# Conflicts:
#	actuator/src/main/java/org/tron/core/actuator/VMActuator.java
Mirrors block_fetch_latency for transactions: measures the end-to-end
round-trip from sending GET_DATA to receiving the full TXS message,
using the timestamp already stored in PeerConnection.advInvRequest at
fetch-dispatch time.

Records nothing for transactions pushed via gossip (no prior GET_DATA),
which is intentional — this metric only captures the active-fetch path.
Overhead is ~500 ns per tx (Item allocation + ConcurrentHashMap.remove +
currentTimeMillis + histogram observe), negligible even at >1k TPS.

Useful for PQ migration baseline / stress-test comparison: shows how
much extra time the bigger Falcon-512 payloads add to in-flight
transaction propagation, independent of local processing cost.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 25, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0fdf7d33-31bc-4430-b020-6f9d47df081f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 3 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Little-Peony and others added 3 commits May 26, 2026 10:23
…ransaction

The original placement in handleTransaction() was dead code:
processMessage() drains advInvRequest at L92-95 (before enqueueing tx
work onto the smartContract/queue handlers), so by the time the worker
thread reaches handleTransaction() the timestamp is already gone and
remove(item) always returns null.

Move the histogram observe into the same draining loop in
processMessage(), using a single currentTimeMillis() reference captured
just before the loop. This is both correct (we observe at the only
remove() call that ever sees a non-null value) and slightly cheaper
(one currentTimeMillis() per TRXS message instead of per tx).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Federico2014 Federico2014 merged commit b057cd3 into Federico2014:pqc-falcon512 May 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants